Pre-processing of image data for enhanced compression

ABSTRACT

Embodiments herein provide for a pre-processing stage or mechanism for enhancing data compression of an image by splitting or separating the color channels for pixels into planar data sources. Typically, image data is displayed as an interleaved set of channel types for a color space such that each pixel within an image (such as a bitmap) has one component for each color channel. By separating the interleaved bitmap into a planar representation, each plane can be compressed independently and often times achieve higher compression ratios. This is especially true for channels that are expected to stay fairly constant throughout the bitmap most of the time. The utilization of the above embodiment can be further enhanced through manipulation of channel data or through converting the color space from one form to another.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application No.60/776,648 entitled the same and filed Feb. 23, 2006, which isincorporated herein by reference in its entirety.

BACKGROUND

Although computers were once isolated and had minimal or littleinteraction with other computers, today's computers interact with a widevariety of other computers through Local Area Networks (LANs), Wide AreaNetworks (WANs), dial-up connections, and so forth. With the wide-spreadgrowth of the Internet, connectivity between computers is becoming moreimportant and has opened up many new applications and technologies. Thegrowth of large-scale networks, and the wide-spread availability oflow-cost personal computers, has fundamentally changed the way that manypeople work, interact, communicate, and play.

One increasing popular form of networking may generally be referred toas virtual computing systems, which can use protocols such as RemoteDesktop Protocol (RDP), Independent Computing Architecture (ICA), andothers to share a desktop and other applications with a remote client.Such computing systems typically transmit the keyboard presses and mouseclicks or selections from the client to a server, relaying the screenupdates back in the other direction over a network connection (e.g., theInternet). As such, the user has the experience as if their machine isoperating as part of a LAN, when in reality the client device is onlysent screenshots of the applications as they appear on the server side.

Because bitmaps are expensive in terms of bandwidth consumption whentransmitted over a network connection (e.g., Internet), rather thansending the entire bitmaps most virtual systems nowadays send graphicprimitives and other operations, which tell a sub-routine on the clientside what and how to draw something. For example, a client may be toldto draw a rectangle along with information about where it should bedrawn, what size, color, etc. For instance, a rectangle may be used todraw a button for a user interface, a border around a document, or anyother purpose for which a rectangular shape may be useful. Of course,there are many other shapes and operations that can be used asprimitives that may be more sophisticated and require more processingthat must be done to transfer and perform the operation on the remoteclient.

As applications continue to get more sophisticated graphical userinterfaces, the more processing intensive the use of the aboveprimitives becomes. For example, bitmap images have been expanded toinclude an Alpha channel, which essentially indicates a desired level oftransparency associated with each pixel. This transparency levelinstructs the client how to blend each pixel of the bitmap with thecolor that was already present where the bitmap is being displayed. Aneven better example of the expense associated with processingsophisticated primitive updates may be animation objects or elements,where a sequence of commands must instruct the client on how to draw theanimation at each stage of the animation. When sequences of primitivesare too complex, it may sometimes make more sense to send a bitmaprepresentation that can more simply be displayed, rather than thepotentially long sequence of other more complicated primitiveoperations. As previously mentioned, however, it may be too expensive tocontinually send full bitmap representations of the screen because ofthe limitations of most bit stream compressors together with limitednetwork bandwidth.

BRIEF SUMMARY

The above-identified deficiencies and drawback of current bitmapcompression mechanisms are overcome through example embodiments of thepresent invention. For example, embodiments described herein provide fora pre-processing mechanism of image data in order to organize thechannel components in such a way that a general compressor can morereadily recognize data patterns; and therefore achieve bettercompression ratios. Note that this Summary is provided to introduce aselection of concepts in a simplified form that are further describedbelow in the Detailed Description. This Summary is not intended toidentify key features or essential features of the claimed subjectmatter, nor is it intended to be used as an aid in determining the scopeof the claimed subject matter.

One example embodiment provides for pre-processing of image data forenhanced data compression by exposing common pattern(s) in the imagedata that are typically unrecognizable by a bit stream processor whenthe image data is displayed in color channel interleaved form. In suchembodiment, a digital image represented as a plurality of pixels isreceived. Each pixel is defined by a color space including colorchannels that are typically displayed such that the layout of theplurality of pixels appears as an interleaved sequence of the colorchannels. Next, it is determined if the digital image is separated intoplanar data sources, each of which includes digital image data for eachof the individual color channels such that redundancy or anotherrecognizable sequence of digital image data can be readily identified byone or more data compression modules that are pattern and/or statisticsbased. Further, based upon the above determination, the planar datasources are sent to the compression module(s) in order to assist them tomore efficiently compress the digital image than when the digital imageis in its interleaved form.

Another embodiment provides a mechanism for decompressing digital imagedata that was encoded as separate color channels of a color space inorder to improve data compression. In this embodiment, a first set ofcompressed digital image data representing one of a planar data sourcesis received, wherein each of the planar data sources corresponds to acolor channel of a color space for a plurality of pixels of a digitalimage. Note that each of the planar data sources were exposed asseparate digital image data such that redundancy or any otherrecognizable sequence of digital image data could be readily identifiedby data compression module(s) that are pattern and/or statistics based.Thereafter, a second set of compressed digital image data representinganother of the planar data sources is received. Accordingly, the firstand second sets of compressed digital image data are decompressed intotheir respective planar data sources. In such instance, the digitalimage can be displayed as an interleaved sequence of the decompressedcolor channels such that each pixel of the digital image includes acolor component corresponding to each of the planar data sources.

Additional features and advantages of the invention will be set forth inthe description which follows, and in part will be obvious from thedescription, or may be learned by the practice of the invention. Thefeatures and advantages of the invention may be realized and obtained bymeans of the instruments and combinations particularly pointed out inthe appended claims. These and other features of the present inventionwill become more fully apparent from the following description andappended claims, or may be learned by the practice of the invention asset forth hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and otheradvantageous features of the invention can be obtained, a moreparticular description of the invention briefly described above will berendered by reference to specific embodiments thereof which areillustrated in the appended drawings. Understanding that these drawingsdepict only typical embodiments of the invention and are not thereforeto be considered to be limiting of its scope, the invention will bedescribed and explained with additional specificity and detail throughthe use of the accompanying drawings in which:

FIG. 1 illustrates a pre-processing stage for assisting in thecompression of a digital image in accordance with example embodiments;

FIG. 2A illustrates the separation of a digital image into planar datasources for enhancing compression ratios in accordance with exampleembodiments;

FIG. 2B illustrates a specific example of using planar data sources forenhanced compression in accordance with exemplary embodiments;

FIG. 2C illustrates the use of planar data sources for exposing patternsand mathematical functions of color channels in accordance with exampleembodiments;

FIG. 2D illustrates additional techniques for manipulating data toenhance pattern recognition for more efficient compression in accordancewith example embodiments;

FIG. 3 illustrates a flow diagram for a method of pre-processing imagedata for improved data compression in accordance with exampleembodiments; and

FIG. 4 illustrates a method of decompressing digital image data that wasencoded as separate color channels of a color space in order to improvedata compression in accordance with example embodiments.

DETAILED DESCRIPTION

The present invention extends to methods, systems, and computer programproducts for separating or splitting color channels of a color spaceinto respective planar representations in order to expose patterns andother sequences to enhance compression ratios. The embodiments of thepresent invention may comprise a special purpose or general-purposecomputer including various computer hardware or modules, as discussed ingreater detail below.

Embodiments herein provide for a pre-processing stage or mechanism forenhancing data compression of an image by splitting or separating thecolor channels for pixels into planar data sources. Typically, imagedata is displayed as an interleaved set of channel types for a colorspace such that each pixel within an image (such as a bitmap) has onecomponent for each color channel. For example, a pixel that has thecolor space of red, green and blue (RGB) will have one color channel forred, one channel for green, and one channel for blue. Accordingly,exemplary embodiments separate the components for each channel intoplanar data sources such that like components are shown within the sameplane. By separating the interleaved bitmap or digital image into aplanar representation each plane can be compressed independently andoften times achieve higher compression ratios. This is especially truefor channels that are expected to stay fairly constant throughout thebitmap most of the time (e.g., an Alpha channel that describes thetransparency of elements within a bitmap).

In other words, exemplary embodiments take advantage of the fact thatoften times one channel can be going through transitions while othersare held fairly constant. The utilization of the above embodiment can befurther enhanced through manipulation of channel data or throughconverting the color space to something other than just RGB. Forexample, other color spaces that define a pixel in terms of illuminationand chrominance (e.g., YUV, YCoCg, etc.) typically describe a colorspace more in terms of how a human eye perceives colors. In other words,these types of color spaces separate color components that an eye ismore sensitive to from those channels that the eye is less sensitive.Accordingly, by taking advantage of the perceptual differences of humaneyes, it is possible to degrade the information within a color channelto enhance patterns that compression models can more efficiently handle,yet allowing the image to remain perceptually lossless.

As described herein, there may be several ways of allowing colorinformation for a particular color space or digital image to be modifiedin order to enhance compression ratios. For example, the chrominancechannels of a particular color scheme may be quantized by reducing theoverall bit count associated with the particular channel, therebyreducing the fidelity of the color palette but not necessarily the rangeof the color scheme. Alternatively, or in conjunction, a sample pixelspace or sub-sampling of various chrominance values can be modified tosome average of the overall values, and or other similar modificationsto bring the values to a common denominator. Of course, as will bedescribed in greater deal below, there may be other mechanisms formodifying data to enhance pattern recognition when pre-processing imagedata for compression.

Once the digital image or bitmap has been split into logically separatedigital images, i.e., one for each plane of channel info, and once allmanipulation or modification of the data has been made, exemplaryembodiments can encode the values using standard or well known encodingmodules such as a two-dimensional run length encoding scheme. Each scanline of the bitmap may be treated as a difference from the scan linethat precedes it and then those differences can be encoded as describedin greater detail below.

Although more specific reference to advantageous features are describedin greater detail below with regards to the Figures, embodiments withinthe scope of the present invention also include computer-readable mediafor carrying or having computer-executable instructions or datastructures stored thereon. Such computer-readable media can be anyavailable media that can be accessed by a general purpose or specialpurpose computer. By way of example, and not limitation, suchcomputer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or otheroptical disk storage, magnetic disk storage or other magnetic storagedevices, or any other medium which can be used to carry or store desiredprogram code means in the form of computer-executable instructions ordata structures and which can be accessed by a general purpose orspecial purpose computer. When information is transferred or providedover a network or another communications connection (either hardwired,wireless, or a combination of hardwired or wireless) to a computer, thecomputer properly views the connection as a computer-readable medium.Thus, any such connection is properly termed a computer-readable medium.Combinations of the above should also be included within the scope ofcomputer-readable media.

Computer-executable instructions comprise, for example, instructions anddata which cause a general purpose computer, special purpose computer,or special purpose processing device to perform a certain function orgroup of functions. Although the subject matter has been described inlanguage specific to structural features and/or methodological acts, itis to be understood that the subject matter defined in the appendedclaims is not necessarily limited to the specific features or actsdescribed above. Rather, the specific features and acts described aboveare disclosed as example forms of implementing the claims.

As used herein, the term “module” or “component” can refer to softwareobjects or routines that execute on the computing system. The differentcomponents, modules, engines, and services described herein may beimplemented as objects or processes that execute on the computing system(e.g., as separate threads). While the system and methods describedherein are preferably implemented in software, implementations inhardware or a combination of software and hardware are also possible andcontemplated. In this description, a “computing entity” may be anycomputing system as previously defined herein, or any module orcombination of modulates running on a computing system.

FIG. 1 illustrates a digital image computing device 100 configured topre-process a digital image or bitmap for compression in accordance withexample embodiments. (Note that the following detailed description willoccasionally reference modules and other items shown in FIG. 1 whendescribing other Figures and embodiments herein.) As shown, a digitalimage 105 can be received by the pre-processing stage 110. Note that thedigital image 105 may be any type of image such as a document of text, aportion or entire user interface, a graphical picture as in a video, orany other similar type graphics. Accordingly, the term digital image 105or bitmap (as used interchangeably herein) should be broadly construedto include any type of graphical information.

Regardless of the type of digital image 105, the bitmap 105 is typicallydisplayed and processed in color channel interleaved form. For example,as shown in FIG. 2A, a digital image 205 may have various pixels (e.g.,pixel A-D) each with color components for color channels of a particularcolor space (e.g., in this example RGB). As shown, each pixel isinterleaved with a color channel for each color component of red, green,and blue. Note that such interleaved fashion of this color space, aswell as other color spaces, can lead to non-optimal compression. Forexample, if a digital image 205 had all blue background, then the bluechannel component of each pixel within the digital image 205 may befully or partially illuminated, while the red and green channels wouldhave no illumination. Nevertheless, most data compression modules 135typically would not recognize such pattern resulting in insufficientcompression. More specifically, such encoders like a run length encodermay only identify the red and the green components within a single pixelas suitable for compression, but still leaving the value of each bluecomponent uncompressed.

In order to overcome such inefficiencies, example embodiments providefor pre-processing stage 110 that can expose common pattern(s) in theimage data that are typically unrecognizable by a bit stream processorwhen the image is displayed in color channel interleaved form. Morespecifically, as shown in FIG. 2A, the digital image 205 can beseparated or split into planar data sources for a red channel 210, greenchannel 215, and a blue channel 220. Such separation of the channelsinto the planar data sources 210, 215, 220 (using, e.g., planarconverter module 115) allows for patterns to emerge such as redundancyor other recognizable sequences of digital image data as will bedescribed in greater detail below. Such pattern exposure now allows fordata compression modules 135 to more efficiently compress data to higherratio levels.

For example, as shown in FIG. 2B, a digital image 125 illustrates a blueshaded circle 130 on a black background (although it is appears in FIG.2B as white for clarity purposes). Assuming additive color mixing in anROB color space (i.e., white is absence or zeroing of all colors in thecolor space), the red and green channel planes 235, 240 would includedall zeros. The blue channel plane 245 would also include zeros exceptfor the area where the circle is illuminated, which in this case isfully illuminated as shown with hexadecimal number “FF”. Accordingly, aswill be recognized, each planar data source (i.e., red channel plane235, green channel plane 240, and blue channel plane 245) can now beseparately compressed using data compression modules 135.

In other words, by separating out the channel components into thevarious planes 235, 240, 245, patterns for each of them are more readilyidentifiable. For example, assuming a digital image 125 of approximatelya thousand pixels (e.g., a 100×100 pixels) and using a simple RLEcompressor, both the red 235 and green 240 channel planes may have acompression ratio of approximately 1,000:1. On the other hand, the bluechannel plane 245 may only have a compression of say 100:1; however, theoverall compression of the digital image 125 without separating thechannels into the different planes may only be slightly greater thanthis value (if not worse). Accordingly, in this example, there isapproximately a two-thirds better compression ratio by separating thechannels into planar data sources 235, 240, 245 as opposed to leavingthem in their interleaved form.

More specifically, by separating the interleaved bitmap 105 into aplanar representation, each plane can be compressed independently andoften times achieve higher compression ratios. This is especially truefor channels that are expected to stay fairly constant throughout thedigital image 105 most of the time. In other words, exemplaryembodiments take advantage of the fact that often times one channel canbe going through transitions while others are held fairly constant. Forexample, assume an Alpha channel was added to the RGB color space, whichtypically describes the transparency of a pixel. Often, the Alphachannel remains constant over the entire image, or only has a smallnumber of pixels with different values for say a button or a smallglyph. Accordingly, by using the above described embodiment ofpre-processing, there is an approximate twenty-five percent increase incompression ratio than when the bitmap 105 is left in interleavedformat. More specifically, because one out of the four channels (in thisexample the Alpha channel) can be highly compressed using only minimalbits relative to the number of bits for the entire channel, an automatictwenty-five percent compression savings is achieved.

Such high compression ratios can be extremely desirable in manyinstances. For example, as mentioned above for a virtual computingsystem in which full bitmaps 105 are sent to a remote client devicerather than primitive operations, the use of the above and otherembodiments as described herein can substantially reduce the bandwidthrequirements to send such images 105. Note, however, that systems ormechanism other than virtual computing systems can also make use of suchadvantageous features. For example, memory consumption is always ofgreat concern, especially as documents, images, and other filescontinuously increase in size. Accordingly, the above and otherembodiments described herein can be utilized to compress photos andother image data that otherwise may not be as compressible in otherformats. Of course, any instance in which high compression ratios aredesirable may take advantage of features described herein. Accordingly,any particular environment for use of these embodiments as describedherein is for illustrative purposes only and is not meant to limit orotherwise narrow the scope of such embodiments unless otherwiseexplicitly claimed.

Note that although exemplary embodiments provide for a planar convertermodule 115 in the pre-processing stage 110, other embodiments allow forthe digital image 105 to be stored in planar format and retrievedon-the-fly to present to data compression modules 135 or otherwiseprocessed in accordance with embodiments described in greater detailbelow. In fact, as mentioned above, the pre-processing 110 of the bitmap105 may occur at some earlier time, the results compressed and stored,and the compressed image 105 sent to a remote or other device withouthaving to decompress and recompress the image 105.

The utilization of the above embodiment can be further enhanced throughconverting the color space to another form and/or manipulating colorchannels. For example, as shown in FIG. 1, pre-processing stage 110includes a color space converter module 120 which can be utilized toconvert color spaces. More specifically, certain color spaces such assome with luminous and chrominance values are better suited for certaintypes of data compression modules 135. In other words, by converting anRGB space into a luminous, chrominance (e.g., YUV, YCoCg, YCbCr, etc.)and improvement in compression ratio may be achieved by almost a 2:1increase. Of course, the type of enhancement in compression ratio maydepended upon the type of data compression module 135 used, the currentform of the digital image 105, or other various considerations. Furthernote that although the above conversion was from an RGB color space to aluminous, chrominance color space, other types of conversions are alsocontemplated here and may include any of the following or other types ofwell known color spaces: RGB, RGBA, CMYK (Cyan, Magnetic, Yellow, Key),CIE forms, YUV, YIQ, YDbDr, HLS, HSL (Hue, Saturation, Luminous), HSV(Hue, Saturation, Value), YCbCr, YPbPr, YCoCr, etc.

In addition to converting the image 105 from one color space to another,it may also be desirable to modify the image 105 or color space in orderto achieve some acceptable loss when attempting to enhance the patternrecognition of a data compression module 135 as described herein. Forinstance, some luminance and chrominance color spaces (e.g., YCoCg)separate the channels into components based on eye sensitivity. In otherwords, the eye is considered to be more sensitive to changes inluminance (shown in FIG. 2D as 270) than the chrominance values (shownin pixel 265 as item C₁ and C₂ 275). Accordingly, by taking advantage ofthe perceptual differences of human eyes, it is possible to degrade theinformation within a color channel to enhance patterns that compressionmodels can more efficiently handle, yet allowing the image to remainperceptually lossless.

As described herein, there may be several ways of allowing colorinformation for a particular color space or digital image 105 to bemodified in order to enhance compression ratios. For example, oneembodiment uses image modification module 125 to allow for sub-samplingas illustrated using the four pixel representation 280 in FIG. 2D. Insuch sub-sampling embodiment, one or more color channel values (e.g., achrominance value 275 C₁ and/or C₂) can be adjusted to match a similarchrominance value of the same type of channel within an adjacent pixel.For instance, if two adjacent pixels have a chrominance value 275 forsay Co in the color space YCoCb that are only slightly different, suchvalue may be normalized or otherwise changed to enhance pattern orredundancy recognition.

By way of another example, consider the four pixels 280 shown in FIG.2D. Each had an original value for a channel of a specific color spaceas shown in the top of each pixel (i.e., 70, 102, 94, and 82), butthrough sub-sampling each was changed to the lower corner number of 87,which is the average of all these values. As can be seen, thissub-sampling or modification of the image space would allow for thesefour pixels to be recognized now as a pattern when separating suchchannel value into the planar data sources. Note that this sub-samplingembodiment may use any number of well known algorithms for normalizingor otherwise converting channel values to enhance pattern recognition.For example, the average, mean, or other statistical value may be used,or the normalization may be based on other rules or data such as whattypes of changes will be less noticeable. Of course, there may be anynumber of ways to modify or normalize the channel values (even using arandom value) as describe herein; and therefore the above examples areused herein for illustrative purposes only.

Of course, other image modification can be done using image modificationmodule 125. For example, the quantization of chrominance or otherchannel values may be desirable. For example, as shown in FIG. 2D, onechrominance value may be represented using 9 bits as shown in the linegrid 285. This nine bit representation, however, may require someadditional processing and more than one byte to represent it.Accordingly, exemplary embodiments allow for a quantization value thatwill allow, e.g., the reducing the number of bits used to represent thesame range of values. For example, if a quantization value is set tothree, the nine bit representation in 285 may be reduced to a six bitrepresentation as shown. Note that in such reduction, that thequantization of the chrominance or other channel component reduces thebit size and thus the color palette; however, the range of colors shouldremain constant. Also note that there may be other ways to modify bitvalues for a channel; and therefore the use of a particular mathematicalmanipulation or quantization value is used herein for illustrativepurposes only and is not meant to limit or otherwise narrow the scope ofembodiments described herein unless otherwise explicitly claimed.

There are other well known techniques for modifying chrominance andother channels within a color space for enhancing pattern recognitionwhen pre-processing digital images 105 in accordance with exemplaryembodiments. For example, control settings 130 can be used in settingconditions on sub-sampling and/or quantization for defiling anacceptable level of color or other loss of data in accordance withexemplary embodiments. Further, there may be other control settings 130that define the type of data compression modules 135 to be used and/orto set other desired preferences that may also be taken intoconsideration when converting or otherwise modifying a color asdescribed herein. Accordingly, the above examples of sub-sampling andquantization are used herein for illustrative purposes only and are notmeant to limit or otherwise narrow the scope of embodiments describedherein unless otherwise explicitly claimed.

In any event, as previously mentioned, once the bitmap 105 has beenlogically split into separate planar bitmaps or planar data sources, thevalues can be encoded using, e.g., even simple encoding schemes such asa run length encoding (RLE). As such, each line of a bit map may betreated as a difference from the scan line that precedes it and thosedifferences may be encoded as follows. For example, one embodimentallows for a control byte that contains a run length and a number of rawbytes that follow the control byte. The control byte may be logicallysplit into two portions, one indicating the run length and anotherindicating a raw number of bytes that follow. In one embodiment, if themaximum value for either of these is exhausted with the need to havemore, a new control byte may follow the raw bytes (if any) in theencoded stream.

Note that some embodiments recognize that it may not be worthwhile toencode a run with a length of less than three bytes; and thus the runlength of values of one and two may be unused. Accordingly, these valuesmay be advantageously used to indicate a longer run than could otherwisebe encoded. For example, the following pseudo code shows how a controlbyte may be decoded and used to otherwise lengthen a run.

// ---- RawLength = ControlByte >> 4; RunLength = ControlByte & 0x0f; if(RunLength == 1) {  RunLength = 16 + RawLength;  RawLength = 0; } elseif (RunLength = 2) {  RunLength = 32 + RawLength;  RawLength = 0; } //----Note that a run length of zero may be possible if there are only rawbytes of data. Of course, there are other forms of code and rules or runlengths that may be used to practice various embodiments describedherein. In addition, and as described in greater detail below, there areother forms of compression (and even stages of compressors) that canadvantageously benefit from embodiments described herein. Accordingly,the above pseudo code, definitions, and use of an RLE are used hereinfor illustrative purposes only and are not meant to limit or otherwisenarrow the scope of embodiments described herein unless otherwiseexplicitly claimed.

Note that in the above examples when the interleaved channels wereseparated into the individual planar data sources, compressiontechniques took advantage of the redundancy of bits for achieving highercompression ratios. Nevertheless, it is worth noting that other patternsor recognizable sequences can also emerge through the above and otherembodiments describe herein. For example, as shown in FIG. 2C, agradient image 250 is provided where light colors of blue at the top ofthe image 250 gradually change to darker shades of blue at the bottom250. When converted into planar form of a blue channel plane 255, thisgradient image 250 may be represented from left to right (representingtop to bottom of the image 250) as the color value as it graduallychanges. Accordingly, such change produces a slope from “zero” to “FF”across the entire blue channel plane 255. Accordingly, variouscompressors may recognize such a pattern and more readily compress thispattern, which would otherwise not be easily recognizable when the otherchannels are interleaved with the blue channel.

Of course, using embodiments described herein to the other channels mayexpose other patterns that can be recognized by typical data compressionmodules 135. Moreover, it should be noted, that although a simple linearslope was identified for the gradient, when other images are usedseparating the channels into their respective planes may cause patternsof more sophisticated mathematical or digital sequences to emerge. Forexample, as shown in the random channel plane 260, the sinusoidal orother type of function of a channel may result depending on the image105. Nevertheless, by separating the channels into planar form, andusing other modification techniques as outlined below, even some of themore sophisticated images can be broken down into more manageablefunctions that a compressor 135 may recognize, which would otherwise notbe identified. In fact, any number of patterns, bit sequences, or otherforms of redundancy can emerge using embodiments described herein, whichmay be more readily compressed by any number of compression modules 135than when the image is left in the interleaved form. Further note thatthese compression modules 135 can be pattern and/or static based.

Regardless of the type of data compression module 135 used to identifydifferent patterns, redundancy, sequence, mathematical functions, etc.,as previously mentioned, other embodiments allow for various stages ofcompression. For example, after performing the above planar separationand modification techniques described, a RLE compressor may be used toidentify redundancy of the different channel or planar data sources.This compressed data may then be passed to another compressor that canidentify other patterns or recognizable sequences. Accordingly, suchprocess may be repetitively performed any number of times to achievehigher compression ratios. Of course, however, at some point there maybe no further benefits and in fact at some point the further compressionattempts may actually decrease the compression ratio. Nevertheless,embodiments described herein consider the use of any number ofcompression modules 135 including, but not limited to, RLE, MPEG based,JPEG, GIF, ZIP, LZ based, JBIG, DejaVu, etc.

In fact, note that only portions of the overall image 105 once separatedand/or modified in planar form may be sent to different compressionmodules 135 for processing. For instance, only the Alpha channel may bepassed to an RLE compressor 135 for processing, while the other channelcomponents are passed to other compressors. Such mechanism may beadvantageous when identifying what patterns or statistical sequences ofdata are best suited for a particular type of compression mechanism. Assuch, any number of compressors and any type may be used on differentplanar data sources as needed.

The present invention may also be described in terms of methodscomprising functional steps and/or non-functional acts. The following isa description of steps and/or acts that may be performed in practicingthe present invention. Usually, functional steps describe the inventionin terms of results that are accomplished, whereas non-functional actsdescribe more specific actions for achieving a particular result.Although the functional steps and/or non-functional acts may bedescribed or claimed in a particular order, the present invention is notnecessarily limited to any particular ordering or combination of stepsand/or acts. Further, the use of steps and/or acts in the recitation ofthe claims only is used to indicate the desired specific use of suchterms.

FIGS. 3 and 4 illustrate flow diagrams for various exemplary embodimentsof the present invention. The following description of FIGS. 3 and 4will occasionally refer to corresponding elements from FIGS. 1, 2A-D.Although reference may be made to a specific element from these Figures,such references are used for illustrative purposes only and are notmeant to limit or otherwise narrow the scope of the describedembodiments unless explicitly claimed.

FIG. 3 illustrates a flow diagram for a method 300 of pre-processing animage for improved data compression in accordance with exampleembodiments. As shown, method 300 includes an act of receiving 305 adigital image. For example, preprocessor stage 110 may receive digitalimage 105, which may be represented as a plurality of pixels whereineach pixel is defined by a first color space including color channelsthat are typically displayed such that the layout of the plurality ofpixels appears as an interleaved sequence of the color channels. Inother words, as shown in digital image 205, pixels may be interleavedwith channels of a color space (e.g., as shown RGB). Note that in mostinstances the color spaces (e.g., RGB, RGBA, CMYK, CIELAB, CIELUV, CIE,YUV, YIQ, YDbDr, HLS, HSL, HIS, HSB, YCbCr, YPbPr, YCoCr, etc.)typically have three or more channel values. Embodiments herein,however, contemplate color spaces that may only have two or more channelvalues.

Method 200 also includes an act of determining 310 if a digital image isto be separated into planar data sources. More specifically, asmentioned above, digital image 105 may already be in a form that isseparated into planar data sources (e.g., a red channel, green channel,blue channel 210, 215, 220). Each planar data source will includedigital image data for each of the individual color channels such thatredundancy or another recognizable sequence of digital image data can bereadily identified by data compression modules 135 that are patternbased, static based, or both. Further, the compression modules 135 maybe one or more of RLE, MPEG based, JPEG, GIF, ZIP, LZ based, JBIG,DejaVu, or other well known pattern or statistical based compressionmechanism.

Based upon the above determination, method 300 also includes an act ofsending 315 planar data sources to data compression modules. Morespecifically, pre-processing stage 110 can send the digital image 105once it has determined it is in planar data source form to the datacompression module(s) 135. Note that by separating the channels into theplanar data sources, such separation assists the data compressionmodules 135 to more efficiently compress digital image 125 than when thedigital image is in interleaved form.

Note that the planar data sources may be sent to multiple compressionmodules 135. For example, the planar data sources may be sent to a datacompression module 135 for compressing large redundancies of digitaldata, and then sent to another compression module 135 for other patternand/or statistical based processing. More specifically, the planar datasources may be passed to an RLE for a first compression mechanism thatidentifies large sequence patters, and then passed to another generalpurpose compressor for further data compression. As an exmple, the RGBcolor space with an Alpha channel allows the Alpha channel with a largeamount of redundancy data to be passed to the RLE.

In the event that it is determined that the digital image is notseparated into the planar data sources, the individual components for afirst color channel and a second color channel may be identified andseparated into their respective planar data source. Also note that otherenhancements to the above embodiments are also available. For example,the color spaces may be converted from a second color space to the firstcolor space, which has a better compression ratio than the second colorspace or can be used to further manipulate the digital image data forbetter pattern or statistical recognition. For instance, the colorspaces may be converted from RGB based to one with luminance andchrominance channels. Further, the color space may be modified byidentifying areas within the planar data sources where the image datacan be altered for better pattern recognition. Based on control settings130, and/or based on the type of compressor module 135 used, theseidentified areas may be by altering the original image data to achieveeven better redundancy or other recognizable sequence or patterns thanwithout the manipulation.

Such modification may include the sub-sampling such that a chrominancevalue for a color channel of a pixel is modified to match a chrominancevalue for another color channel of an adjacent pixel. Such modificationmay further be based on the average of the chrominance values, or someother statistical or other reasoning to normalize values. Alternatively,or in conjunction, the modification may include a quantization ofchrominance (or other channel) components such that the bit size for thecorresponding color channel is reduced a predetermined amount in orderto reduce the amount of data needed to represent the chrominance (orother channel) component such that the reduction of the bit size reducesthe color palette, but not the range of colors.

Note that the digital image may be in a virtual network computingenvironment such that the digital image 105 will be compressed fortransmission to a remote device. In such embodiment, the digital imagemay be too complex to send to a remote device as a series of primitivesand if left in its interleaved form the compression and transmission ofthe digital image to the remote device overly consumes transmissionbandwidth.

FIG. 4 illustrates a method 400 of decompressing digital image data thatwas encoded as a separate color channel of a color space in accordancewith example embodiments. Method 400 includes a step for displaying 420the digital image as an interleaved sequence of decompressed colorchannels. Step for 420 includes an act of receiving 405 a first set ofcompressed digital image data representing one planar data source. Forexample, a remote device may receive a first set of compressed digitalimage data representing one of at least two planar data sources (e.g.,red channel planar data source 210), wherein each of the at least twoplanar data sources corresponds to a color channel of a first colorspace for a plurality of pixels 205 of a digital image 105. Each of thetwo planar data sources are exposed as separate digital image data suchthat the redundancy or any other recognizable sequence of digital imagedata could readily be identified by data compression modules 135 thatare pattern based, static based, or both.

Thereafter step for 420 includes an act of receiving 410 a second set ofcompressed digital image data representing another planar data source.In other words, a remote device may also receive a planar data source ofand green channel planar data source 215 that is compressed inaccordance with exemplary embodiments described herein. Thereafter, stepfor 420 includes and act of decompressing 415 the first and second setof compressed digital image data into their respective planar datasources. Once decompressed, the planar data sources can be properlyinterleaved back to the digital image 105 and appropriately displayedsuch that each pixel 205 of the digital image includes a color componentcorresponding to each of the at least two planar data sources. Note thatother embodiments previously described regarding the pre-processing ofimage data may also correspond to the decompression embodiment hereindescribed.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by the foregoing description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

1. In a digital image computing device, a method of pre-processing animage for improved data compression by exposing one or more commonpatterns in the image data that are typically unrecognizable by a bitstream processor when the image data is displayed in color channelinterleaved form, the method comprising: receiving a digital imagerepresented as a plurality of pixels, wherein each pixel is defined by afirst color space including at least two color channels that aretypically displayed such that the layout of the plurality of pixelsappears as an interleaved sequence of the at least two color channels;determining if the digital image is separated into at least two planardata sources, each of which includes digital image data for each of theindividual at least two color channels such that redundancy or anotherrecognizable sequence of digital image data can be readily identified byone or more data compression modules that are pattern based, statisticsbased, or both; and based upon the above determination, sending the atleast two planar data sources to the one or more data compressionmodules in order to assist the one or more data compression modules tomore efficiently compress the digital image than when the digital imageis in its interleaved form.
 2. The method of claim 1, wherein thedigital image is in a virtual network computing environment and thedigital image is compressed for transmitting to a remote device, andwherein the digital image is too complex to send to the remote device asa series of graphic primitives, and wherein if left in its interleavedform the compression and transmission of the digital image to the remotedevice overly consumes transmission bandwidth.
 3. The method of claim 1,wherein the one or more data compression modules includes one or more ofRLE, MPEG based, JPEG, GIF, ZIP, LZ based, JBIG, DejaVu, or other wellknown pattern or statistical based compression mechanism.
 4. The methodof claim 1, wherein the at least two planar data sources are sent to afirst data compression module for compressing large redundancies ofdigital data and then sent to a second data compression module for otherpattern, statistical, or arithmetic based processing.
 5. The method ofclaim 1, wherein it is determined that the digital image is notseparated into the at least two planar data sources, the method furthercomprising: identifying each individual component of a first colorchannel for the at least two color channels and placing them into afirst planar data source corresponding to one of the at least two planardata sources; and identifying each individual component of a secondcolor channel for the at least two color channels and placing them intoa second planar data source corresponding to another of the at least twoplanar data sources.
 6. The method of claim 1, wherein the first colorspace is one of RGB, RGBA, CMYK, CIELAB, CIELUV, CIE, YUV, YIQ, YDbDr,HLS, HSL, HIS, HSB, YCbCr, YPbPr, and YCoCr.
 7. The method of claim 1,further comprising one or more of: converting a second color space tothe first color space, which has a better compression ratio than thesecond color space or can be used to further manipulate the digitalimage data for better pattern or statistical recognition; identifyingone or more areas within the at least two planar data sources where theimage data can be altered for better pattern recognition; and based onone or more control settings, or based on the type of compressor used,modifying the areas by altering original image data to achieve evenbetter redundancy or other recognizable sequences or patterns thanwithout the manipulation.
 8. The method of claim 7, wherein the firstcolor space is a color space that has color channels of luminance and atleast one chrominance component, and wherein the second color space isRGB based.
 9. The method of claim 8, wherein the modification includessub-sampling such that at least a chrominance value for one colorchannel of a pixel is modified to match a chrominance value for anothercolor channel of an adjacent pixel.
 10. The method of claim 9, whereinthe modification is based on an average of the chrominance values. 11.The method of claim 8, wherein the modification includes a quantizationof the at least one chrominance component such that the bit size for thecorresponding color channel is reduced a predetermined amount in orderto reduce the amount of data needed to represent the at least onechrominance component, and wherein the reduction of the bit size reducesthe color palette, but not the range of colors.
 12. The method of claim1, wherein at least one of the at least two planar data sources ispassed to an RLE for a first compression mechanism that identifies largesequence patters, and wherein the at least two planar data sources arepassed to another general purpose compressor for further datacompression.
 13. The method of claim 12, wherein the first color spaceis an RGB color space with an Alpha channel, and wherein the Alphachannel comprises a large amount of redundancy data, which is passed tothe RLE.
 14. In a remote device of a virtual network computingenvironment that transmits digital images that are too complex to sendto a remote device as a series of graphic primitives, a method ofdecompressing digital image data that was encoded as separate colorchannels of a color space, the method comprising: receiving a first setof compressed digital image data representing one of at least two planardata sources, wherein each of the at least two planar data sourcescorresponds to a separate color channel of a first color space for aplurality of pixels of a digital image, and wherein each of the at leasttwo planar data sources were exposed as separate digital image data suchthat redundancy or another recognizable sequence of digital image datacould be readily identified by one or more data compression modules thatare pattern based, statistics based, or both; receiving a second set ofcompressed digital image data representing another of the at least twoplanar data sources; decompressing the first and second sets ofcompressed digital image data into their respective planar data sources;and displaying the digital image as an interleaved sequence of thedecompressed color channels such that each pixel of the digital imageincludes a color component corresponding to each of the at least twoplanar data sources.
 15. The method of claim 14, wherein the one or moredata compression modules compressed the at least two planar data sourcesinto one or more of the following forms: RLE, MPEG based, JPEG, GIF,ZIP, LZ based, JBIG, DejaVu, or other well known pattern or statisticalbased forms.
 16. The method of claim 14, wherein the first color spaceis one of RGB, RGBA, CMYK, CIELAB, CIELUV, CIE, YUV, YIQ, YDbDr, HLS,HSL, HIS, HSB, YCbCr, YPbPr, and YCoCr.
 17. The method of claim 14,wherein the first color space is converted into a second color spaceprior to displaying the digital image.
 18. The method of claim 17,wherein the first color space is a color space that has color channelsof luminance and at least one chrominance component, and wherein thesecond color space is RGB based.
 19. The method of claim 14, wherein thefirst color space is an RGB color space with an Alpha channel with alarge amount of redundancy data, and wherein the Alpha channel isreceived as a compressed RLE stream.
 20. In a digital image computingdevice, a computer program product for implementing a method ofpre-processing an image for improved data compression by exposing one ormore common patterns in the image data that are typically unrecognizableby a bit stream processor when the image data is displayed in colorchannel interleaved form, the computer program product comprising one ormore computer-readable media having stored thereon computer-executableinstructions that, when executed by one or more processors of thecomputing system, cause the computing system to perform the following:receive a digital image represented as a plurality of pixels, whereineach pixel is defined by a first color space including at least twocolor channels that are typically displayed such that the layout of theplurality of pixels appears as an interleaved sequence of the at leasttwo color channels; determine if the digital image is separated into atleast two planar data sources, each of which includes digital image datafor each of the individual at least two color channels such thatredundancy or another recognizable sequence of digital image data can bereadily identified by one or more data compression modules that arepattern based, statistics based, or both; and based upon the abovedetermination, send the at least two planar data sources to the one ormore data compression modules in order to assist the one or more datacompression modules to more efficiently compress the digital image thanwhen the digital image is in its interleaved form.